package com.royal.lr.interview;

import java.util.Arrays;

public class AlgorithmProblem {

    public static String largestNum(Integer[] arr){
        return Arrays.asList(arr).stream().
                map(String::valueOf).
                sorted((s1,s2)->(s2+s1).compareTo(s1+s2)).
                reduce((s1,s2)->(s1+s2)).get();
    }
}
